<template>
    <span>
        <button @click="jian">-</button>
        {{num}}
        <button @click="jia">+</button>
    </span>
</template>
<script>
export default {
    props:['num','i'],
    methods:{
        jian(){
            this.$emit('jian',this.i)
        },
        jia(){
            this.$emit('jia',this.i)
        }
    }
}
</script>